using ExampleWebApplication.Entities;
using ExampleWebApplication.Models;
using TelerikMvcGridCustomBindingHelper.NHibernate;

namespace ExampleWebApplication.Infraestruture.Aggregates
{
    class SumUnitPriceMultipliedByUnitsOnOrderExpressionAggregateFunction : NHibernateGridCustomBindingHelper<Product, ProductModel>.ExpressionAggregateFunction
    {
        protected override AggregateExpression GetExpression()
        {
            return Sum(product => product.UnitPrice * product.Units_On_Order);
        }
    }
}